#include "client.h"
void lsCommand(client_task_t * task){
    //循环接受server发过来的数据并打印
    while(1){
        int len = 0;
        CmdType x = (CmdType) -1;
        char buff[1024] = {0};
        recvn(task->peerfd, &len, sizeof(len));
        recvn(task->peerfd,&x,sizeof(x));
        recvn(task->peerfd, buff, len);
        if(!len){
            break;
        }//换行打印
        puts(buff);
    }
}
